import { createStore } from '@/airstore';
import ApiClient from '@/services/apiClient';

export default createStore({
  namespace: 'DamageRptStore',
  async submitDamageReport(loginName, rpt) {
    const res = await ApiClient.post('jcDamageReport/v1/saveDamageReport', {
      loginUser: loginName,
      jsonResult: JSON.stringify(rpt),
    });
    return res;
  },
  async getDamageReport(data) {
    const res = await ApiClient.post('jcDamageReport/v1/getDamageReport', {
      jsonResult: JSON.stringify(data),
    });
    return res;
  },
});
